package se19team1e.dao.abstrakt.generics;

import java.io.Serializable;

/**
 * A super interface that all DTO class must implement, to define the basic DTO
 * operation interfaces. Basic common functionalities are ID and delete flag for
 * a DTO. This DTO class will be use by a concrete implementation of a DAO.
 * 
 * @see AccountDAO 
 * @param <T>
 *            Generic template that defines which entity will implement this
 *            interface. For example, AccountDTO
 * @author Arun Manivannan
 * 
 */
public interface DataTransferObject<T> extends Serializable {
	/**
	 * Interface for a DTO to return an id
	 * 
	 * @return object id
	 */
	public Object getId();

	/**
	 * Interface to set the Id of DTO
	 * 
	 * @param id
	 */
	public void setId(Object id);

	/**
	 * 
	 * Interface to check if an existing object is deleted from the persistence
	 * storage by the given id.
	 * 
	 * @return boolean
	 */
	public boolean isDeleted();

	/**
	 * Interface for a DTO to be mark as deleted
	 * 
	 * @param deleted
	 */
	public void setDeleted(boolean deleted);

}
